﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Sowrk03_28.Repository
{
    public interface IRepository<T> where T : class, new()
    {
        Task<List<T>> AllAsync();

        Task<T> GetAsync(int id);

        Task<List<T>> GetValues(Expression<Func<T, bool>> expre);

        Task<int> CreateAsync(T entity);

        Task<int> UpdateAsync(T entity);

        Task<int> DeleteAsync(T entity);

        Task<int> DeleteAllAsync(List<T> t);
    }
}
